package com.yufei.infoExtractor.pfw;

import java.io.File;



import java.sql.Timestamp;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.yufei.infoExtractor.pfw.entity.Category;
import com.yufei.infoExtractor.pfw.entity.Entity;
import com.yufei.infoExtractor.pfw.entity.Pattern;
import com.yufei.infoExtractor.pfw.entity.Relatedlink;
import com.yufei.infoExtractor.pfw.entity.Seedsite;
import com.yufei.infoExtractor.pfw.entity.Task;
import com.yufei.infoExtractor.pfw.mongodb.DataRepository;

public interface InfoExtractorDao {
public  void removeEntity(Entity entity);
public void addCategory(Category category);
public void addSeedsite(Seedsite seedsite);
public void addTask(Task task);
public List<Seedsite> getSeedSiteByStatus(final Integer status);
public List<Seedsite> getSeedSiteByTaskName(final String taskName);
public void updateSdStatus(final Integer status,final String seedsiteid);
public List<Task> getTasks();
public List<Task> getTaskByStatus(final Integer status);
public void updateTaskStatus(final Integer status,final String taskid);
//设置爬虫任务相关时间
public void setTaskTime(final String taskid,Timestamp startedtime,Timestamp endTime);
//public List<Regularex> getRegularexBySeedsiteId(final String seedsiteid);
//获取某个种子网址已经抓取的链接的指纹
public Set<String> getLinkFingerprints(String taskName,Class entity);
public void addPattern(Pattern pattern);
public List<Pattern> getPatternByTaskName(String taskName);
public void setTaskEndTime(Date date,String taskId);
public void setTaskStartedTime(Date date,String taskId);
public String saveMediaFile(File file);
public File queryMediaFileById(String mediaFileId);
public void generateXmlForTaskCrawlerResult(Class cla);
/**used to save or update the object(if it has saved in database)
 * @param links
 */
public void saveEntity(Entity entity);
/**
 * @param links
 */
void batchInsertLinks(Set links);
public DataRepository getDataRepositoryI();
public DataRepository getDataRepositoryI(String dataBaseName);

}
